#ifndef __INS_RECEIVE_H__
#define __INS_RECEIVE_H__

#include "struct_typedef.h"

#include "main.h"

#define INS_FLAME_ONE_DONE  0   //完成第一帧数据接收
#define INS_FLAME_TWO_DONE  1   //完成第二帧数据接收
#define INS_FLAME_THREE_DONE 2  //完成第三帧数据接收


typedef struct
{
    union
    {
        struct
        {
            fp32 gyro[3];   //角速度
            fp32 angle[3];  //角度
        }fp32;
	    uint8_t uint8[52];
    } ins_data;
   int ins_receive_state_flag; //接收数据状态机
} ins_receive_t;

extern void ins_receive(CAN_RxHeaderTypeDef rx_header,uint8_t rx_data[8]); //INS接收函数
extern const fp32 *get_gyro_data_point(void);
extern const fp32 *get_angle_data_point(void);

#endif
